imageSource
Type
property
Summary
Specifies an image to be displayed in place of the specified character in a field.
Syntax
set the imageSource of <character> to {<imageID> | <imageName> | <imageURL> |empty}
Description
Use the imageSource property to display a picture or icon inside a text field.
Setting the imageSource of a character hides the character.
Setting the imageSource of a character to empty removes the image and allows the character to appear instead.
If the image is noticeably taller than the text in the field, it may appear cut off if the field's fixedLineHeight property is set to true. To correct this problem, set the field's fixedLineHeight to false.
Do not use the URL keyword when specifying an imageURL. The imageSource of a character is a file location (or image ID or name), not the image data itself. If you use the URL keyword, the imageSource property is set to the contents of the URL, not the URL itself, and this is usually not what's wanted.
Examples
set the imageSource of char 1 of line 2 of field "This" to 2533
set the imageSource of char thisChar of field 1 to "Arrow"
set the imageSource of last char of me to "binfile:My Image"
Related
keyword: character, URL, image, field, characters
object: field
property: icon, behavior, fixedLineHeight, name
glossary: property, keyword, current stack
Compatibility and Support
Introduced
LiveCode 1.1
OS
mac
windows
linux
ios
android
Platforms
desktop
server
mobile